FROM golang:1.17-alpine3.15 as builder
ENV GO111MOULE=on CGO_ENABLE=0 GOOS=linux GOARCH=amd64
WORKDIR /build
COPY . .
RUN go build -o httpserver

FROM alpine:3.15
COPY --from=builder /build/httpserver /build/httpserver
EXPOSE 8888
ENTRYPOINT ["/build/httpserver"]